import { api } from './index'

export const userApi = {
  // 登录
  login(credentials) {
    return api.post('/login', credentials)
  },
  
  // 获取用户信息
  getUserInfo() {
    return api.get('/user/info')
  },
  
  // 退出登录
  logout() {
    return api.post('/auth/logout')
  },
  
  // 刷新token
  refreshToken() {
    return api.post('/auth/refresh')
  }
}